<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      .wrap {
        width: 375px;
        height: 205px;
        border: 1px solid #000;
        padding: 12px 15px;
        box-sizing: border-box;
      }
      .title {
        font-size: 14px;
        color: #333;
        margin: 0 0 12px;
      }
      .content {
        width: 345px;
        height: 148px;
        display: flex;
        overflow: auto;
      }
      .item {
        width: 85px;
        height: 100%;
        margin-right: 10px;
        background-color: lightcoral;
        flex-shrink: 0;
      }
      .item:last-child {
        margin: 0;
      }
    </style>
  </head>
  <body>
    <div id="app">
      <div class="wrap">
        <div class="title">最受好评电影</div>
        <div class="content">
          <div class="item" v-for="item in list" :key="item._id">
            <!-- <img :src="item.xxx" alt=""> -->
            {{ item.title }}
          </div>
        </div>
      </div>
    </div>

    <script src="./lib/vue3.js"></script>
    <script>
      const { createApp } = Vue;

      createApp({
        data() {
          return {
            list: [],
          };
        },
        mounted() {
          fetch("http://www.pudge.wang:3080/api/rated/list")
            .then((response) => response.json())
            .then((res) => {
              this.list = res.result;
            });
        },
      }).mount("#app");
    </script>
  </body>
</html>
